<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struct template accumulator_set</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../accumulators/reference.html#doxygen.accumulators_framework_reference.accumulators__fwd_8hpp" title="Header &lt;boost/accumulators/accumulators_fwd.hpp&gt;">
<link rel="prev" href="structboost_1_1accumulators_1_1tag_1_1value__tag.html" title="Struct template value_tag">
<link rel="next" href="structboost_1_1accumulators_1_1as__feature.html" title="Struct template as_feature">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1accumulators_1_1tag_1_1value__tag.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../accumulators/reference.html#doxygen.accumulators_framework_reference.accumulators__fwd_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1accumulators_1_1as__feature.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template accumulator_set</span></h2>
<p>boost::accumulators::accumulator_set — A set of accumulators. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../accumulators/reference.html#doxygen.accumulators_framework_reference.accumulators__fwd_8hpp" title="Header &lt;boost/accumulators/accumulators_fwd.hpp&gt;">boost/accumulators/accumulators_fwd.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Sample<span class="special">,</span> <span class="keyword">typename</span> Features<span class="special">,</span> <span class="keyword">typename</span> Weight<span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html" title="Struct template accumulator_set">accumulator_set</a> <span class="special">{</span>

  <span class="comment">// <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#id-1_3_2_6_2_3_1_1_1_4-bb">public member functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A1<span class="special">&gt;</span> 
    <span class="keyword">explicit</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1af87bb23b0efc6cce08d28fc2ba5b6d1f"><span class="identifier">accumulator_set</span></a><span class="special">(</span><span class="identifier">A1</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A1<span class="special">&gt;</span> 
    <span class="keyword">explicit</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aa768fc4b4ce53deded5dbbb9070adcac"><span class="identifier">accumulator_set</span></a><span class="special">(</span><span class="identifier">A1</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UnaryFunction<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a71f3e0e723cddc36f253f60ff31c7fa4"><span class="identifier">visit</span></a><span class="special">(</span><span class="identifier">UnaryFunction</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FilterPred<span class="special">,</span> <span class="keyword">typename</span> UnaryFunction<span class="special">&gt;</span> 
    <span class="keyword">void</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aee351d9b1ac13614b4d612d69c24f519"><span class="identifier">visit_if</span></a><span class="special">(</span><span class="identifier">UnaryFunction</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a572a363eda7c0e7af81c89b78de6dd5f"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> apply<span class="special">&lt;</span> <span class="identifier">Feature</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <span class="special">&amp;</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1ab0e596f97db369f881ef33f3942cd579"><span class="identifier">extract</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> apply<span class="special">&lt;</span> <span class="identifier">Feature</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1ab87f9b999a5f22040d59c2efb7846cfc"><span class="identifier">extract</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a85612efecb83a055ba9ab9dcf8fb406d"><span class="identifier">drop</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Archive<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html#doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aa49d766b2fb06393289302c4366423e0"><span class="identifier">serialize</span></a><span class="special">(</span><span class="identifier">Archive</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.2.6.2.3.10.4"></a><h2>Description</h2>
<p><a class="link" href="structboost_1_1accumulators_1_1accumulator__set.html" title="Struct template accumulator_set">accumulator_set</a> resolves the dependencies between features and ensures that the accumulators in the set are updated in the proper order.</p>
<p>acccumulator_set provides a general mechanism to visit the accumulators in the set in order, with or without a filter. You can also fetch a reference to an accumulator that corresponds to a feature. </p>
<div class="refsect2">
<a name="id-1.3.2.6.2.3.10.4.4"></a><h3>
<a name="id-1_3_2_6_2_3_1_1_1_4-bb"></a><code class="computeroutput">accumulator_set</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A1<span class="special">&gt;</span> 
  <span class="keyword">explicit</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1af87bb23b0efc6cce08d28fc2ba5b6d1f"></a><span class="identifier">accumulator_set</span><span class="special">(</span><span class="identifier">A1</span> <span class="keyword">const</span> <span class="special">&amp;</span> a1<span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">)</span><span class="special">;</span></pre>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">a1</code></span></p></td>
<td><p>Optional named parameter to be passed to all the accumulators </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> A1<span class="special">&gt;</span> 
  <span class="keyword">explicit</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aa768fc4b4ce53deded5dbbb9070adcac"></a><span class="identifier">accumulator_set</span><span class="special">(</span><span class="identifier">A1</span> <span class="keyword">const</span> <span class="special">&amp;</span> a1<span class="special">,</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <span class="special">=</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span><span class="special">)</span><span class="special">;</span></pre>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">a1</code></span></p></td>
<td><p>Optional sample parameter to be passed to all the accumulators </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> UnaryFunction<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a71f3e0e723cddc36f253f60ff31c7fa4"></a><span class="identifier">visit</span><span class="special">(</span><span class="identifier">UnaryFunction</span> <span class="keyword">const</span> <span class="special">&amp;</span> func<span class="special">)</span><span class="special">;</span></pre>
<p>Visitation 
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">func</code></span></p></td>
<td><p>UnaryFunction which is invoked with each accumulator in turn. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> FilterPred<span class="special">,</span> <span class="keyword">typename</span> UnaryFunction<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aee351d9b1ac13614b4d612d69c24f519"></a><span class="identifier">visit_if</span><span class="special">(</span><span class="identifier">UnaryFunction</span> <span class="keyword">const</span> <span class="special">&amp;</span> func<span class="special">)</span><span class="special">;</span></pre>
<p>Conditional visitation 
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">func</code></span></p></td>
<td><p>UnaryFunction which is invoked with each accumulator in turn, provided the accumulator satisfies the MPL predicate FilterPred. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a572a363eda7c0e7af81c89b78de6dd5f"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Accumulation 
</p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> apply<span class="special">&lt;</span> <span class="identifier">Feature</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <span class="special">&amp;</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1ab0e596f97db369f881ef33f3942cd579"></a><span class="identifier">extract</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Extraction. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> apply<span class="special">&lt;</span> <span class="identifier">Feature</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span> <span class="keyword">const</span> <span class="special">&amp;</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1ab87f9b999a5f22040d59c2efb7846cfc"></a><span class="identifier">extract</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Feature<span class="special">&gt;</span> <span class="keyword">void</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1a85612efecb83a055ba9ab9dcf8fb406d"></a><span class="identifier">drop</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Drop. </li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Archive<span class="special">&gt;</span> 
  <span class="keyword">void</span> <a name="doxygen.accumulators_framework_reference.structboost_1_1accumulators_1_1accumulator__set_1aa49d766b2fb06393289302c4366423e0"></a><span class="identifier">serialize</span><span class="special">(</span><span class="identifier">Archive</span> <span class="special">&amp;</span> ar<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> file_version<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2005, 2006 Eric Niebler<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1accumulators_1_1tag_1_1value__tag.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../accumulators/reference.html#doxygen.accumulators_framework_reference.accumulators__fwd_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1accumulators_1_1as__feature.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
